1. Field of the Invention
The present invention relates to a control apparatus having a window control function, a communication control apparatus having a window control function and a storage medium for storing a window control program.
2. Description of the Related Art
A large amount of data is transmitted from a telephone exchange to a terminal such as an accounting transaction center connected to the telephone exchange by splitting the data into typically packets. The terminal on the reception side receives the data which is then subjected to next processing. In this case, the transmitter may be connected to the receiver by one transmission line. In such a system, the order of receiving the data is always the same as the order in which the data is transmitted. Thus, the receiver may just supply the received data to the next processing in the same order as the order of receiving the data. By using only one transmission line, however, the amount of data transmitted in a unit time is limited. In order to transmit a large amount of data, it is thus necessary to connect the transmitter to the receiver by using a plurality of transmission lines as is the case with a representative MLP (Multilink Procedure) of the ITU-recommended X25 interface. In this case, a sequence number is assigned to each piece of distributed data, and the pieces of data are transmitted through the transmission lines by distributing the pieces of data among the lines. However, it is quite within the bounds of possibility that the order of data reception at reception time does not match the sequence numbers assigned to the pieces of data due to differences in length between the pieces of data and differences in transmission speed between the transmission lines. In order to solve this problem, in the MLP, the order is controlled by carrying out the following processing.
The transmitter adopts a technique of assigning sequence numbers pertaining to a series having a modulo value. For example, sequence numbers with a modulo value of 4,096 are assigned to pieces of transmitted data. The receiver supplies the received pieces of data sequentially to the next processing in accordance with the sequence numbers assigned to the pieces of data. If the sequence number assigned to a received specific piece of data is not the expected number, the particular piece of data is put in a state waiting for a piece of data with the expected sequence number to arrive. As the piece of data with the expected sequence number is received, this piece of data is supplied to the next processing along with the particular piece of data put in a wait state. If the sequence number assigned to a received specific piece of data is much different from the expected sequence number, however, a problem of destruction arises. To be more specific, the receiver is put in a dilemma as to whether to let a received piece of data enter a wait state or to let the data be discarded in accordance with the value of the expected sequence number. It is necessary to set a tolerance for choosing one of the 2 dilemma alternatives. Such a tolerance is referred to as a window. To put it in detail, if the sequence number of a received piece of data is the expected sequence number, the piece of data is supplied to the next processing. If the sequence number of a received piece of data is within a window, the piece of data is put in a wait state. If the sequence number of a received piece of data is outside the window, on the other hand, the piece of data is discarded.
However, processing to form a judgment as to whether or not the sequence number of a received piece of data is within a window can not be carried out by simple comparison of the magnitudes of numbers if sequence numbers assigned to transmitted pieces of data are a series of numbers changing as a modulo-value number. This is because, in the case of a modulo value of 4,096, for example, the number following 4,095 is 0. Thus, the formation of such a judgment must be based on a complex algorithm which lengthens the time it takes to justify either the wait state of data or the destruction of the data. For example, assume that the sequence number of a received piece of data is MN (S)=0, the expected sequence number of a piece of data to be received next is MV (R)=4,090, the window size MW=8 and the modulo value is 4,096. In this case, the following complex processing is carried out.
(1) The window boundary value is of 4,098 (=MV (R)+MW).
(2) Since the upper boundary value 4,098 is greater than the modulo value 4,096 (4,098 greater than 4,096), the window is a pattern including 0.
(3) The window thus covers the range the range 0 to 2, where the number 2 is modulo 4,096 of 4,098, that is, 2=4,098-4,096. That is to say, it is obvious that an MN (S) in the range 0 to 2 is also within the window.
(4) The value of 2 is found by extracting the 12 lowest-order bits from the boundary value of 4,098. The 12 bits of the upper boundary value of 4,098 is Bxe2x80x981000000000010xe2x80x99.
The 12 lowest-order bits of the boundary value of 4,098 is Bxe2x80x98000000000010xe2x80x99 or Dxe2x80x22 where the prefixes B and D appended to the numbers indicate that the numbers are expressed in the binary and decimal formats respectively.
(5) Since the MN (S) of 0 is within the range 0 to 2, the MV (S) is judged to be included in the window.
It is thus an object of the present invention addressing the problem described above to provide a communication control apparatus having a window control function and a control apparatus having a window control function that are capable of forming complicated judgment processing simple.
In accordance with an aspect of the present invention, there is provided a control apparatus having a window control function, the apparatus characterized by being further provided with a distance computation means for computing a signed n-bit distance as a result of subtraction of a second sequence number cyclically updated to vary like a modulo-N number from a first sequence number cyclically updated to vary like a modulo-N number where N is a positive integer greater than 1 and the nth power of 2 is greater than N (2n greater than N); a lowest-order-bit extraction means for extracting m lowest-order bits of the distance where the mth power of 2 is equal to N (2m=N); and a distance judgment means for forming a judgment as to whether or not the first sequence number is within a window set with the second sequence number used as a reference by comparison of the m lowest-order bits of the distance extracted by the lowest-order-bit extraction means with the size of the window.
In accordance with another aspect of the present invention, there is provided a communication control apparatus having a window control function, the apparatus characterized by being further provided with a data reception means for receiving data including a first sequence number MN (S) cyclically updated to vary like a modulo-N number where N is a positive integer greater than 1; a distance computation means for computing a signed n-bit distance as a result of subtraction of a second sequence number MV (R) cyclically updated to vary like a modulo-N number from the first sequence number MN (S) where the nth power of 2 is greater than N (2n greater than m) wherein the second sequence number MV (R) is an expected number supposed to be included in data to be received next; a lowest-order-bit extraction means for extracting m lowest-order bits of the distance where the mth power of 2 is equal to N (2mxc3x97N); a distance judgment means for forming a judgment as to whether or not the first sequence number MN (S) is within a window set with the second sequence number MV (R) used as a reference by comparison of the m lowest-order bits of the distance extracted by the lowest-order-bit extraction means with the size of the window; a mark appending means for appending an acceptance-confirmation mark to the data including the first sequence number MN (S) if the first sequence number MN (S) is within the window; a data control mark for discarding the data including the first sequence number MN (S) if the first sequence number MN (S) is not within a window; and a number updating means for updating the second sequence number MV (R) as a modulo-N number on the basis of the acceptance-confirmation mark if the second sequence number MV (R) expected to be received next is equal to the first sequence number MN (S) included in the data received by the data reception means.
In accordance with a further aspect of the present invention, there is provided a communication control apparatus having a window control function, the apparatus characterized by being further provided with a data reception means for receiving delivery confirmation data including a first sequence number MN (S) and used for showing delivery confirmation from a reception side; a distance computation means for computing a signed n-bit distance as a result of subtraction of a second sequence number MV (T) from the first sequence number MN (S) where the nth power of 2 is greater than N (2n greater than N) if the first sequence number MN (S) received by the data reception means is not equal to the second sequence number MV (T) wherein the second sequence number MV (T) is a number expected to be included in delivery confirmation data received from the reception side to indicate delivery confirmation; a lowest-order-bit extraction means for extracting m lowest-order bits of the distance where the mth power of 2 is equal to N (2mxc3x97N); a distance judgment means for forming a judgment as to whether or not the first sequence number MN (S) is within a window set with the second sequence number MV (T) used as a reference by comparison of the m lowest-order bits of the distance extracted by the lowest-order-bit extraction means with the size of the window; a mark appending means for appending a received-delivery-confirmation mark to the delivery confirmation data including the first sequence number MN (S) if the first sequence number MN (S) is within the window; and a number updating means for updating the second sequence number MV (T) as a modulo-N number on the basis of the received-delivery-confirmation mark if the first sequence number MN (S) received by the data reception means is equal to the second sequence number MV (T) wherein the second sequence number MV (T) is a number expected to be included in delivery confirmation data to be received next from the reception side to indicate delivery confirmation.
The above and other objects, features and advantages of the present invention and the manner of realizing them will become more apparent, and the invention itself will be best understood from a study of the following description and appended claims with reference to the attached drawings showing some preferred embodiments of the invention.